// 业务管理
let baseName = '系统管理'
export const menu = {
    title: '系统管理',
    path: '/system',
    name: 'system',
    meta: {
        keepAlive: true
    },
    component: resolve => {
        require(['@/pages/index/index.vue'], resolve)
    },
    redirect: {
        name: 'system'
    },
    children: [
        {
            title: '修改密码',
            path: '/system/changepwd',
            name: 'changepwd',
            meta: {
                keepAlive: true, //是否缓存页面
                breadcrumb: [baseName, '修改密码']
            },
            component: r => require.ensure([], () => r(require('@/pages/system/changepwd/index')), 'changepwd')
        },
        {
            title: '账号管理',
            path: '/system/account',
            name: 'system-account',
            meta: {
                keepAlive: true, //是否缓存页面
                breadcrumb: [baseName, '账号管理']
            },
            component: r => require.ensure([], () => r(require('@/pages/system/account/index')), 'system-account')
        },
        {
            title: '下属公司',
            path: '/submainbody/',
            name: 'submainbody',
            meta: {
                keepAlive: true, //是否缓存页面
                breadcrumb: [baseName, '下属公司']
            },
            component: r => require.ensure([], () => r(require('@/pages/system/submainbody/index')), 'submainbody')
        }
    ]
}

// [业务演示] 路由设置
export const router = {
    ...menu,
    children: [].concat(...menu.children.map(e => e.children || e))
}